<template>
  <div class="container">
    <van-nav-bar fixed title="发布文章"/>
    <!-- 已登录的样子 -->
    <article-form v-if="hasLogin"></article-form> 
    <!-- 未登录的样子 -->
    <van-empty v-else   description="登录之后才可以发表哦！" />
  </div>
</template>

<script>
import articleForm from '../components/article-form.vue'
import { gettoken } from '../utils/storage'
export default {
  components: { articleForm },
  data() {
    return {
      hasLogin:false,
    }
  },
  created () {
    this.hasLogin =gettoken()
  },
 
}
</script>

<style scoped lang="less">

</style>